package com.masterclient.app.businessmodule.minemodule.redpack.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.ViewGroup;

import java.util.List;

/**
 * 作者：sean
 * 创建时间：2017/8/4 16:59
 * 功能说明：
 */

public class RepackedPagerAdapter extends FragmentStatePagerAdapter {
    String[] titles = {"获取明细","支出明细"};
    private List<Fragment> list;
    public RepackedPagerAdapter(FragmentManager fm, List<Fragment> list) {
        super(fm);
        this.list = list;

    }
    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];//页卡标题
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Fragment getItem(int arg0) {
        return list.get(arg0);
    }
    @Override
    public Object instantiateItem(ViewGroup arg0, int arg1) {

        return super.instantiateItem(arg0, arg1);
    }
    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {
        super.destroyItem(container, position, object);
    }
}
